home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Producer's Bible / Multimedia Producer's Bible.iso / mac / mTropolis / mTropolis Sampler Files / mFactory Object Model Examples / Source / Gravity / Gravity.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-20  |  817 b   |  52 lines  |  [TEXT/MMCC]

  1. /*    Gravity.h
  2. **
  3. **    Copyright 1995, mFactory, Inc.
  4. **    All rights reserved.
  5. */
  6.  
  7. #pragma once
  8.  
  9. #ifndef _GravitySrv_
  10.     #define _GravitySrv_
  11.     
  12.     typedef struct GravitySrvComp GravitySrvComp;
  13.  
  14.     #ifndef MSelf
  15.         #define MComponentName Gravity
  16.         #define MSelf GravitySrvComp
  17.         #include "MFusion.h"
  18.     #endif
  19.  
  20.     typedef struct VectorStruct {
  21.         double            f_x;
  22.         double            f_y;
  23.     } VectorStruct;
  24.  
  25.     typedef struct GravitySrvComp {
  26.         MEvent            f_enableEvent;
  27.         MEvent            f_disableEvent;
  28.         MDouble            f_constant;
  29.  
  30.         VectorStruct    f_table[20][20];
  31.     } GravitySrvComp;
  32.  
  33.     const short kGravitySrvRev = 0;
  34.  
  35.     enum {
  36.         kGravitySrvTask, kLastGravitySrvProc
  37.     };
  38.  
  39.     const kGravitySrvSlot = kMBaseCompSlot + 1;
  40.  
  41.     #ifdef __cplusplus
  42.         extern "C" {
  43.     #endif
  44.  
  45.         MErr GravitySrvTask(GravitySrvComp *self, MTInfo *tinfo);
  46.  
  47.     #ifdef __cplusplus
  48.         }
  49.     #endif
  50.  
  51. #endif
  52.